package com.junzhiit.nengji.model.enums;

import com.bainaeco.framework.exception.InvalidArgumentException;

public enum VipHistoryStatus {

	WAIT(0, "未支付"), 
	PAID(1, "已支付"), 
	NONEED(2, "无需支付");
	private Integer status;

	private String value;

	private VipHistoryStatus(Integer status, String value) {
		this.status = status;
		this.value = value;
	}

	public int toIntStatus() {
		return this.status;
	}

	public String toStringValue() {
		return this.value;
	}

	public static VipHistoryStatus toFlag(int status) {
		if (WAIT.status == status) {
			return WAIT;
		} else if (PAID.status == status) {
			return PAID;
		} else if (NONEED.status == status) {
			return NONEED;
		} else {
			throw new InvalidArgumentException("Unknown ShopStatus[" + status + "].");
		}
	}
}
